package net.noday.util;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * 适用于所有表的分页,其功能是封装该页的记录
 *
 */
public class PageBean {
    private int pagesize;
    private int pagecode;
    private int allcount;
    @SuppressWarnings("unused")
	private int allpages;
    
    //封装记录
    private List<Object> list = new ArrayList<Object>();

	public int getPagesize() {
		return pagesize;
	}

	public void setPagesize(int pagesize) {
		this.pagesize = pagesize;
	}

	public int getPagecode() {
		return pagecode;
	}

	public void setPagecode(int pagecode) {
		this.pagecode = pagecode;
	}

	public int getAllcount() {
		return allcount;
	}

	public void setAllcount(int allcount) {
		this.allcount = allcount;
	}

	public int getAllpages() {
		return allcount%pagesize==0?allcount/pagesize:allcount/pagesize+1;
	}

	public void setAllpages(int allpages) {
		this.allpages = allpages;
	}

	public List<Object> getList() {
		return list;
	}

	public void setList(List<Object> list) {
		this.list = list;
	}
    
    
    
}
